Skip to content

Conversation

@shaneknapp
Copy link
Contributor

What changes were proposed in this pull request?

we need to add the ability to test PRBs against java11.

see comments here: #25405

How was this patch tested?

the build system will test this.

@SparkQA
Copy link

SparkQA commented Aug 12, 2019

Test build #108987 has started for PR 25423 at commit 69e77e2.

@shaneknapp
Copy link
Contributor Author

from the console output: Using java executable: /usr/java/jdk-11.0.1/bin/java

looks like we should be good! i'll let the build run and double-check everything when it's done.

@shaneknapp
Copy link
Contributor Author

@shaneknapp shaneknapp changed the title [SPARK-28701][test-java11] adding java11 support for pull request builds [SPARK-28701][test-java11][k8s] adding java11 support for pull request builds Aug 12, 2019
@shaneknapp
Copy link
Contributor Author

test this please

@shaneknapp
Copy link
Contributor Author

Merged build finished. Test FAILed.

i manually killed the initial test because i wanted to make sure that any k8s-based tests won't be affected by this change... the prb and k8s tests run on different machines (centos vs ubuntu) and while i am certain they won't have any JAVA_HOME collisions it's cheaper to test and be sure.

@SparkQA
Copy link

SparkQA commented Aug 12, 2019

@dongjoon-hyun
Copy link
Member

Thank you, @shaneknapp !

@SparkQA
Copy link

SparkQA commented Aug 12, 2019

Test build #108988 has finished for PR 25423 at commit 69e77e2.

  • This patch fails to generate documentation.
  • This patch merges cleanly.
  • This patch adds no public classes.

@shaneknapp
Copy link
Contributor Author

oof... javadoc is quite unhappy about java11:

[error] (spark/javaunidoc:doc) javadoc returned nonzero exit code
[error] Total time: 122 s, completed Aug 12, 2019, 11:01:18 AM
[error] running /home/jenkins/workspace/SparkPullRequestBuilder/build/sbt -Phadoop-2.7 -Pkubernetes -Phive-thriftserver -Phadoop-cloud -Pkinesis-asl -Pyarn -Pspark-ganglia-lgpl -Phive -Pmesos unidoc ; received return code 1

this is definitely out of scope of this particular PR, but needs to be addressed. since my java skills are rather basic i could really use some help here.

@SparkQA
Copy link

SparkQA commented Aug 12, 2019

@shaneknapp
Copy link
Contributor Author

test this please

@SparkQA
Copy link

SparkQA commented Aug 12, 2019

@SparkQA
Copy link

SparkQA commented Aug 12, 2019

Test build #108989 has finished for PR 25423 at commit 69e77e2.

  • This patch fails to generate documentation.
  • This patch merges cleanly.
  • This patch adds no public classes.

@viirya
Copy link
Member

viirya commented Aug 12, 2019

Seems scala 2.12.8 is not completely compatible to JDK 11?

https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html#jdk-11-compatibility-notes

@shaneknapp
Copy link
Contributor Author

need to run the k8s test again...

@shaneknapp
Copy link
Contributor Author

test this please

@shaneknapp
Copy link
Contributor Author

Seems scala 2.12.8 is not completely compatible to JDK 11?

https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html#jdk-11-compatibility-notes

ugh. :\

@shaneknapp
Copy link
Contributor Author

Seems scala 2.12.8 is not completely compatible to JDK 11?

https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html#jdk-11-compatibility-notes

@srowen any ideas here?

@srowen
Copy link
Member

srowen commented Aug 12, 2019

2.12.8 should work fine enough for Spark's purposes, or at least, we aren't seeing any test failures in all but one module, for a long time now. The java module system thing is not something Spark uses.
2.12.9 advertises better support, but it has an important bug.
We'll update to 2.12.10 eventually, but I don't think there's a known issue here.

@SparkQA
Copy link

SparkQA commented Aug 12, 2019

@shaneknapp
Copy link
Contributor Author

2.12.8 should work fine enough for Spark's purposes, or at least, we aren't seeing any test failures in all but one module, for a long time now. The java module system thing is not something Spark uses.
2.12.9 advertises better support, but it has an important bug.
We'll update to 2.12.10 eventually, but I don't think there's a known issue here.

well, it might be blocking this PR (SPARK-27365), and every single java11 build on jenkins is currently broken and failing hive integration tests.

@SparkQA
Copy link

SparkQA commented Aug 12, 2019

Test build #108991 has finished for PR 25423 at commit 69e77e2.

  • This patch fails to generate documentation.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Aug 12, 2019

Yes, Spark does not yet pass tests on Java 11, because of Hive-related issues. That's the last big chunk of work. It's not a scala issue though.

@shaneknapp
Copy link
Contributor Author

Yes, Spark does not yet pass tests on Java 11, because of Hive-related issues. That's the last big chunk of work. It's not a scala issue though.

@srowen -- it doesn't seem to be just Hive-related issues... testing this PRB against java11 also shows that it's both failing the java/scala unidoc section and the k8s integration tests.

i guess the TL;DR here is twofold:

  1. spark built w/java11 will continue to be broken for the near future.
  2. we should definitely merge in these changes to master to set ourselves up for better java11 testing moving forward.

@SparkQA
Copy link

SparkQA commented Aug 12, 2019

@srowen
Copy link
Member

srowen commented Aug 12, 2019

It's possible; I am not sure for example https://amplab.cs.berkeley.edu/jenkins/view/Spark%20QA%20Test%20(Dashboard)/job/spark-master-test-maven-hadoop-3.2-jdk-11/252/console reaches the scaladoc phase.

Hm, I wasn't aware that one wasn't checking K8S. Let me at least add these to the umbrella.

I bet we can solve both without too much trouble.

@HyukjinKwon
Copy link
Member

retest this please

1 similar comment
@HyukjinKwon
Copy link
Member

retest this please

@SparkQA
Copy link

SparkQA commented Aug 25, 2019

@SparkQA
Copy link

SparkQA commented Aug 25, 2019

@SparkQA
Copy link

SparkQA commented Aug 25, 2019

Test build #109685 has finished for PR 25423 at commit bae6524.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 25, 2019

Test build #109686 has finished for PR 25423 at commit bae6524.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

if "test-java11" in os.environ["ghprbPullTitle"].lower():
os.environ["JAVA_HOME"] = "/usr/java/jdk-11.0.1"
os.environ["PATH"] = "%s/bin:%s" % (os.environ["JAVA_HOME"], os.environ["PATH"])
test_profiles += ['-Djava.version=11']
Copy link
Member

@HyukjinKwon HyukjinKwon Aug 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we try to set this in python tests too? Seems like Java gateway has to use JDK 11 as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should use Java 11 if the path provides Java 11 and the test harness that runs Python tests does too. At least I don't know how else one would tell pyspark what to use!

In fact I'm pretty sure the test failure here shows that it is using JDK 11. From JPMML: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory This would be caused by JDK 11 changes. However, I don't get why all the other non-Python tests don't fail.

Given the weird problem in #24651 I am wondering if we have some subtle classpath issues with how the Pyspark tests are run.

This one however might be more directly solvable by figuring out what is suggesting to use this old Sun JAXB implementation. I'll start digging around META-INF

Copy link
Member

@srowen srowen Aug 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, and why does https://amplab.cs.berkeley.edu/jenkins/view/Spark%20QA%20Test%20(Dashboard)/job/spark-master-test-maven-hadoop-3.2-jdk-11/ pass then? it is doing the same thing in the Jenkins config. (OK I think I answered my own question below)

EDIT: Oh, because it doesn't run Pyspark tests?

Copy link
Member

@HyukjinKwon HyukjinKwon Aug 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, actually you're right. Yes, seems after Scala tests here, the PATH and JAVA_HOME still set as are.

I thought:

SPARK_HOME = _find_spark_home()
# Launch the Py4j gateway using Spark's run command so that we pick up the
# proper classpath and settings from spark-env.sh
on_windows = platform.system() == "Windows"
script = "./bin/spark-submit.cmd" if on_windows else "./bin/spark-submit"
command = [os.path.join(SPARK_HOME, script)]
if conf:
for k, v in conf.getAll():
command += ['--conf', '%s=%s' % (k, v)]
submit_args = os.environ.get("PYSPARK_SUBMIT_ARGS", "pyspark-shell")
if os.environ.get("SPARK_TESTING"):
submit_args = ' '.join([
"--conf spark.ui.enabled=false",
submit_args
])
command = command + shlex.split(submit_args)

args.mainClass = "org.apache.spark.api.python.PythonGatewayServer"

Here somehow happened to use JDK 8.

Actually the PySpark tests and SparkR tests passed at #25443 (comment)

So, the issue persists here .. but I guess yes we can do it separately since at least this PR seems setting JDK 11 correctly, and it virtually doesn't affect any main or test code (if this title is not used).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's interesting. Thank you for the investigation, @srowen and @HyukjinKwon

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a JIRA issue for this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need one, yeah, regardless of the cause. I'll file one to track.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srowen
Copy link
Member

srowen commented Aug 26, 2019

I personally think this is OK to merge simply because we need a way to test JDK 11, and this seems to do that. The rest of the error is orthogonal.

So, in order to use this in a JDK 11 Jenkins build, how would one configure the Jenkins job? it is only triggering off the PR title (which is also useful). OK if that's a future step.

@HyukjinKwon
Copy link
Member

HyukjinKwon commented Aug 26, 2019

So, in order to use this in a JDK 11 Jenkins build, how would one configure the Jenkins job? it is only triggering off the PR title (which is also useful). OK if that's a future step.

Yes, same conclusion

@HyukjinKwon
Copy link
Member

Merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants